package au.com.handsunited.model.validators.entity;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;

import au.com.handsunited.model.Group;
import au.com.handsunited.model.validators.address.GroupLocationValidator;
import au.com.handsunited.model.validators.availability.AvailabilityValidator;
import au.com.handsunited.model.validators.contactinfo.GroupContactInfoValidator;

/**
 * @author arunda
 *
 */
public class GroupValidator extends BaseEntityValidator implements Validator {


	private static Logger logger = LoggerFactory.getLogger(GroupValidator.class);

	public GroupValidator(GroupLocationValidator locationValidator, GroupContactInfoValidator contactInfoValidator, AvailabilityValidator availabilityValidator) {

		super(locationValidator, contactInfoValidator, availabilityValidator);

	}


	/**
	 * @see org.springframework.validation.Validator#supports(java.lang.Class)
	 */
	@Override
	public boolean supports(Class clazz) {
		return clazz.isAssignableFrom(Group.class);
	}

	/**
	 * @see org.springframework.validation.Validator#validate(java.lang.Object, org.springframework.validation.Errors)
	 */
	@Override
	public void validate(Object target, Errors errors) {
		super.validate(target, errors);

	}

}
